home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9264 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: news.ifm.liu.se!usenet
  2. From: Kjell Andersson <kand@dualheights.rydnet.lysator.liu.se>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Help with sin() - big problem
  5. Date: Sat, 09 Mar 1996 00:35:21 +0100
  6. Message-ID: <3140C439.28110DF9@dualheights.rydnet.lysator.liu.se>
  7. References: <4hhusi$49i@sunburst.ccs.yorku.ca>
  8. NNTP-Posting-Host: dualheights.rydnet.lysator.liu.se
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (X11; I; Linux 1.2.1 i486)
  13.  
  14. Naftali Sturm wrote:
  15.  
  16. >     result = sin(numb);
  17. > result and num are both float's.
  18. >  The problem is that when numb is 1.0, the
  19. > program gives me .84147 , and when numb is 45.0
  20. > the program gives me .85090, and each number is a different result.
  21. > However I took a look at my sine table in my trigonometry book, and
  22. > it says the sine of 1 is .018, the sine of 45 is .707, and
  23. > different results than what my program said.
  24. >   Why?
  25.  
  26. The problem is that you are specifying numb in degrees. Sin wants is
  27. argument in radians.
  28.